// 获取轮播图图片
    // 轮播模块
    let carousel = layui.carousel;
    // 轮播交互
    function getLpic(){
      $.ajax({
    type:'GET',
    url:'/api/swipers',
    success:function(res){
      console.log(res.data)
    res.data.forEach(item => {
      
        $('#kr_carousel ul').append($(`<li class="img-effect">
        <a href="javascript:;">
        <img src="./uploads/${item.swiperimg}" alt="">
       </a>
    </li>`))
    });
    carousel.render({
      elem: '#kr_carousel',
      width: 720,
      height: 300,
      interval: 3000
    });
    }
      })
    }
    getLpic()

   function getHezuo(){
     $.ajax({
      type:'GET',
      url:'/api/links',
      success:function(res){

        
        console.log(res.data)
        res.data.forEach(item=>{
          $('.kr_collaborator').append($(`
          <dd>
               <a href="${item.linkurl}">
                 <img src="./uploads/${item.linkicon}" alt="">
               </a>
             </dd>
          `))
        })

      }


     })
   } 
 
   getHezuo()


